package com.example.lib_base.net

import com.example.lib_base.net.entity.CarEntityResult
import com.example.lib_base.net.entity.LoginEntity
import com.example.lib_base.net.entity.VideoEntityResult
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query

interface ApiService {

    @POST("/api/user/login")
    suspend fun login(@Query("username")username:String,@Query("password")password:String): Res<LoginEntity>

    @POST("/api/user/register")
    suspend fun sear(@Query("username")username:String,@Query("password")password:String):Res<LoginEntity>

    @GET("/api/parking-spaces/type/{spaceType}")
    suspend fun car(@Path("spaceType")spaceType:String):Res<CarEntityResult>

    @GET("/api/parking-spaces/status/{spaceStatus}")
    suspend fun status(@Path("spaceStatus")spaceStatus:String):Res<CarEntityResult>

    @GET("/api/parking-spaces/area/{areaId}")
    suspend fun area(@Path("areaId")areaId:Int):Res<CarEntityResult>

    @GET("/api/front/products")
    suspend fun video(@Query("limit")limit:Int,@Query("page")page:Int):VideoEntityResult
}